"""doc"""
from rest_framework.serializers import DateTimeField
from app_base.ser import BaseSerializer
from . import models


class CommunitySer(BaseSerializer):
    class Meta:
        model = models.Community
        fields = "__all__"


class HouseSer(BaseSerializer):
    paid_at = DateTimeField(format="%Y-%m-%d %H:%M:%S", required=False, read_only=True)

    class Meta:
        model = models.House
        fields = "__all__"


class HouseBillSer(BaseSerializer):
    class Meta:
        model = models.HouseBill
        exclude = ["pay_user_openid"]
